<!DOCTYPE html>
<html>
<head>
    <title>平台定时任务</title>
    <#include "/header.html">

</head>
<body>
<div id="rrapp" v-cloak>
    <div v-show="showList==1">
        <div class="container-div ui-layout-center" style="height:54px;padding: 10px 0">
            <div class="layui-col-md2" style="margin-right: 30px">
                <input type="text" class="form-control" v-model="q.beanName"  placeholder="bean名称">
             </div>
            <div class="layui-col-md2" style="margin-right: 30px">
                <input type="text" class="form-control" v-model="q.remark"  placeholder="请输入备注相关信息进行检索">
            </div>
            <button id="schedule_search" ref="schedule_search" class="btn btn-default" @click="query">查询</button>
            <a class="btn btn-primary" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</a>
            <a class="btn btn-primary" @click="copy"><i class="fa fa-copy"></i>&nbsp;复制</a>
            <a class="btn btn-primary" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</a>
            <a class="btn btn-primary" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
            <a class="btn btn-primary" @click="pause"><i class="fa fa-pause"></i>&nbsp;暂停</a>
            <a class="btn btn-primary" @click="resume"><i class="fa fa-play"></i>&nbsp;恢复</a>
            <a class="btn btn-primary" @click="runOnce"><i class="fa fa-arrow-circle-right"></i>&nbsp;立即执行</a>
        </div>
<div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief">
    <ul class="layui-tab-title" style="left: 0;
    margin-bottom: 15px;
    border-bottom: none;">
        <li class="layui-this">自动</li>
        <li>手动</li>
    </ul>
    <div class="col-sm-12 select-info table-striped">
        <table id="bootstrap-table" data-mobile-responsive="true"></table>
    </div>
</div>
</div>

<div  v-show="showList==2"  class="panel panel-default">
    <div class="panel-heading">{{title}}</div>
    <form class="form-horizontal">
        <div class="form-group">
            <div class="col-sm-2 control-label">bean名称<i style="color: red;">*</i></div>
            <div class="col-sm-10">
                <input type="text" class="form-control" v-model="schedule.beanName" :readonly="isReadOnly"  placeholder="spring bean名称，如：testTask"/>
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-2 control-label">平台选择<i style="color: red;">*</i></div>
            <div class="col-sm-10">
                <select class="selectpicker" id="siteSelect"  data-actions-box="true" data-live-search="true" multiple style="width: 100%;" >
                </select>
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-2 control-label">方法名称<i style="color: red;">*</i></div>
            <div class="col-sm-10">
                <input type="text" class="form-control" v-model="schedule.methodName"  :readonly="isReadOnly" placeholder="方法名称"/>
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-2 control-label">比例</div>
            <div class="col-sm-10">
                <input type="text" class="form-control" v-model="schedule.avgValue"  placeholder="请输入比例"/>
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-2 control-label">开始时间</div>
            <div class="col-sm-10">
                <input type="text" class="layui-input" id="startTime" placeholder="开始时间" autocomplete="off">
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-2 control-label">结束时间</div>
            <div class="col-sm-10">
                <input type="text" class="layui-input" id="endTime" placeholder="结束时间" autocomplete="off">
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-2 control-label">时间间隔</div>
            <div class="col-sm-10">
                <input type="text" class="form-control" v-model="schedule.intervalSeconds" placeholder="时间间隔"/>
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-2 control-label">cron表达式<i style="color: red;">*</i></div>
            <div class="col-sm-10">
                <input type="text" class="form-control" v-model="schedule.cronExpression" placeholder="如：0 0 12 * * ?"/>
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-2 control-label">备注</div>
            <div class="col-sm-10">
                <input type="text" class="form-control" v-model="schedule.remark" placeholder="备注"/>
            </div>
        </div>
        <div class="form-group" >
            <div class="col-sm-2 control-label">启动模式<i style="color: red;">*</i></div>
            <div class="col-sm-10" id="radios" style="line-height: 35px;">
                <div style="position:relative;display: inline-block;width: 60px;">
                    <input id="item1" type="radio" value="2" name="type" value="自动" checked>
                    <label for="item1">自动</label>
                </div>
                <div style="position:relative;display: inline-block;width: 60px">
                    <input id="item2" type="radio" value="1" name="type" value="手动">
                    <label for="item2">手动</label>
                </div>
            </div>
        </div>
        <div class="form-group" v-show="!isReadOnly">
            <div class="col-sm-2 control-label">是否启动<i style="color: red;">*</i></div>
            <div class="col-sm-10" id="radios2" style="line-height: 35px;">
                <div style="position:relative;display: inline-block;width: 60px">
                    <input id="item3" type="radio" value="2" name="start" value="启动" checked>
                    <label for="item3">启动</label>
                </div>
                <div style="position:relative;display: inline-block;width: 60px">
                    <input id="item4" type="radio" value="1" name="start" value="关闭">
                    <label for="item4">关闭</label>
                </div>
            </div>
        </div>
        <!--<div class="form-group" v-show="!isReadOnly">-->
            <!--<div class="col-sm-2 control-label">状态<i style="color: red;">*</i></div>-->
            <!--<div class="col-sm-10" id="radios3" style="line-height: 35px;">-->
                <!--<div style="position:relative;display: inline-block;width: 60px">-->
                    <!--<input id="item5" type="radio" value="0" name="status" value="启动" checked>-->
                    <!--<label for="item5">启动</label>-->
                <!--</div>-->
                <!--<div style="position:relative;display: inline-block;width: 60px">-->
                    <!--<input id="item6" type="radio" value="1" name="status" value="暂停">-->
                    <!--<label for="item6">暂停</label>-->
                <!--</div>-->
            <!--</div>-->
        <!--</div>-->
        <div class="form-group">
            <div class="col-sm-2 control-label"></div>
            <input type="button" class="btn btn-primary" ref="schedule_submit" @click="saveOrUpdate" value="确定"/>
            &nbsp;&nbsp;<input type="button" class="btn btn-warning" @click="reload" value="返回"/>
        </div>
    </form>
</div>
<div v-show="showList==3" >
    <div class="grid-btn" style="height:54px;">
        <div class="form-group col-sm-2">
            <input type="text" class="form-control" v-model="q.jobId"  placeholder="请输入jobId">
        </div>
        <select class="selectpicker" id="siteSelect2"  data-live-search="true" multiple style="width: 100%;" >
        </select>
        <button  class="btn btn-default" @click="queryLog">查询</button>
        <button id="retreat"  class="btn btn-warning" @click="reload">返回</button>
    </div>
    <table id="bootstrap-table1" data-mobile-responsive="true"></table>
</div>
</div>

<script src="${request.contextPath}/statics/js/modules/job/platformTiming.js?_${.now?long}"></script>
<style>
    input[type="radio"] + label::before {
        content: "\a0"; /*不换行空格*/
        display: inline-block;
        vertical-align: middle;
        font-size: 18px;
        width: 1em;
        height: 1em;
        margin-right: .4em;
        border-radius: 50%;
        border: 1px solid #1c84c6;
        text-indent: .15em;
        line-height: 1;
    }
    input[type="radio"]:checked + label::before {
        background-color: #1c84c6;
        background-clip: content-box;
        padding: .2em;
    }
    input[type="radio"] {
        position: absolute;
        clip: rect(0, 0, 0, 0);
    }
    .texts{
        white-space: normal !important;
        height:auto;
        vertical-align:text-top;
        word-break: break-all;
        white-space: pre-line !important;
        overflow: visible !important;
        padding:5px;

    }
    .selectedTr{
        background-color: #dff0d8 !important;
    }
   .selectedTr td{
       background-color: #dff0d8 !important;
   }
</style>
</body>
</html>